package com.jzo2o.customer.controller.worker;

import com.jzo2o.customer.model.domain.BankAccount;
import com.jzo2o.customer.model.dto.response.BankAccountResDTO;
import com.jzo2o.customer.service.IBankAccountService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @Description BankAccountController
 * @Author liujiangyuan
 * @Date 2024-12-03-9:30
 */
@RestController("workbankAccountController")
@RequestMapping("/worker/bank-account")
@Api(tags = "服务端 - 银行账号相关接口")
public class BankAccountController {
    @Resource
    private IBankAccountService iBankAccountService;
    @PostMapping()
    @ApiOperation("银行账号插入")
    public void bankAccountinsertorupdate(@RequestBody BankAccount bankAccount) {
        iBankAccountService.bankAccountinsertorupdate(bankAccount);
    }
    @GetMapping("currentUserBankAccount")
    @ApiOperation("获取当前用户银行账号接口")
    public BankAccountResDTO currentUserBankAccount(){
        return iBankAccountService.currentUserBankAccount();
    }
}
